package cn.cs.service;

import cn.cs.common.Constants;
import cn.cs.common.DateUtil;
import cn.cs.common.EmptyUtils;
import cn.cs.common.Page;
import cn.cs.mapper.CsAgentShopMapper;
import cn.cs.mapper.CsProductMapper;
import cn.cs.pojo.CsAgentShop;
import cn.cs.pojo.CsProduct;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * yuexl
 */
@RestController
public class RestCsAgentShopService {

    @Resource
    private CsAgentShopMapper csAgentShopMapper;

    @RequestMapping(value = "/getAgentShopById",method = RequestMethod.POST)
    public CsAgentShop getAgentShopById(@RequestParam("id") String id)throws Exception {
        return csAgentShopMapper.getAgentShopById(id);
    }

    @RequestMapping(value = "/getAgentShopListByMap",method = RequestMethod.POST)
    public List<CsAgentShop> getAgentShopListByMap(@RequestBody Map<String,Object> param)throws Exception {
        return csAgentShopMapper.getAgentShopListByMap(param);
    }

    @RequestMapping(value = "/getAgentShopCountByMap", method = RequestMethod.POST)
    public Integer getAgentShopCountByMap(@RequestBody Map<String,Object> param)throws Exception {
        return csAgentShopMapper.getAgentShopCountByMap(param);
    }
}
